# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=doxygen
pkgver=1.12.0
pkgrel=0
pkgdesc="Documentation system for C++, C, Java, IDL and PHP"
url="https://www.doxygen.nl/"
arch="all"
license="GPL-2.0-or-later"
checkdepends="libxml2-utils"
makedepends="flex bison coreutils perl python3 cmake samurai"
subpackages="$pkgname-doc"
source="https://doxygen.nl/files/doxygen-$pkgver.src.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DGIT_EXECUTABLE=/bin/false \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-Dbuild_xmlparser=ON
	cmake --build build
}

check() {
	# Remove test that use bibtex
	rm -f ./testing/012_cite.dox
	cd build
	ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e407e29c5e232e1f8dca291dd2d00b1dd400be709400225339408fad2cd758563b69f290cbd7c0efeb76b1335c4672fb1d6d580b9e6ed570708cf9b7d78951b1  doxygen-1.12.0.src.tar.gz
"
